package com.travel.utils;

import org.springframework.context.annotation.Bean;

import java.text.SimpleDateFormat;
import java.util.*;


public class TimeUtil {


    public static void main(String[] args) {
        Calendar calendar = new GregorianCalendar();

        //取今天的时间
        Date today=new Date();
        calendar.setTime(today);
        calendar.add(calendar.DATE,1);
        today=calendar.getTime();
        //转化日期
        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
        String date= formatter.format(today);
        System.out.println(date);
    }

}
